package com.calligraphy.user;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@EnableDiscoveryClient
@EnableAsync
@EnableCaching
@Slf4j
public class UserApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(UserApplication.class, args);
        String serverPort = context.getEnvironment().getProperty("server.port");
        log.info("User started at http://localhost:" + serverPort);
    }

}

